package cn.shopifymall.spring.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

@Repository
public class UserDao {

    @Autowired
    private JdbcTemplate jdbcTemplate;

    public void insert() {
        String sql = "INSERT INTO user(id, name, money) VALUES(?,?,?)";
        jdbcTemplate.update(sql, "9001", "wangwu", 20);
    }

}
